﻿(function ($, undefined) {
    $.inplaceMessage = function (options) {
        var container = $("#inplace-message-container");
        
        if (container.length == 0) {
            container = $("<div id='inplace-message-container' style='display:none;line-height:2;'></div>").appendTo("body");
        }

        var _options = $.extend({
                type: "information", // information | error
                messageTitle: "",
                messageContent: ""
        }, options);

        alert(_options.messageContent);
        //container.html(_options.messageContent)
        //    .dialog({
        //        modal: true,
        //        title: _options.messageTitle,
        //        resizable: false,
        //        width: 370,
        //        buttons: [{
        //            "OK": function () {
        //                $(this).dialog("close");
        //            }
        //        }]
        //    }).find('.ui-dialog-title').css('white-space', 'nowrap');

    };
})(jQuery);